import {Component} from 'react';
import axios from 'axios';
class App extends Component{
    render(){
        return(
            <div>
                <h1>跨域</h1>
                <button onClick={()=>this.getList()}>请求</button>
                <button onClick={()=>this.getMove()}>获取列表</button>
            </div>
        )
    }
    getList(){
        axios.get('/api/xhr/item/listByCategory.json?csrf_token=088e8443e441d325ecf467b36e80cf5d&__timestamp=1687656388946&sortType=0&descSorted=false&subCategoryId=109323008&deliveryAreaId=0&categoryId=1005000').then(res=>{
            console.log(res)
        }).catch(err=>{
            console.log(err)
        })
    }
    getMove(){
        axios.get('/yinghua/api.php/provide/ws?wd=%E7%94%9C%E8%9C%9C%E4%BF%9D%E9%95%96&page=1').then(res=>{
            console.log(res)
        })
    }
}
export default App;